package com.uwlaser.rest;

import com.uwlaser.service.OeeService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.text.ParseException;

/**
 * @author mx
 * @ClassName:OeeController
 * @description:oee功能
 * @create 2022-11-10 15:34
 */
@RestController
@RequiredArgsConstructor
@Api(tags = "oee功能")
@RequestMapping("/api/oee")
public class OeeController {
    private final OeeService oeeService;
    /**
     * 获取设备oee
     */
    @PostMapping("/getEquipmentOee")
    @ApiOperation("获取oee")
    public ResponseEntity getEquipmentOee(@RequestBody String lienCode) throws ParseException {
        return oeeService.getEquipmentOee(lienCode);
    }


}
